<script>
$(document).ready(function(){
	//alert('already');
	$('#UserRegisterForm').validate();
});

function check_pass_confirm(){
	var ok=true;
	if ($('#pass').val() != $('#pass_confirm').val()){
		alert('Mật khẩu không khớp !');
		ok=false;
	}
	return ok;
}
</script>
<style>
<!--
.mb_title {
    color: #4697F6;
    font: bold 17px Arial,san-serif;
}
.mb_bgtitle {
    background: url("../img/register/tieude.jpg") repeat scroll 0 0 transparent;
    border-bottom: 1px solid #D6E8FD;
    color: #E4EBF4;
    font: bold 11px Verdana,Tahoma,Arial;
    padding: 6px 6px 7px;
    width: 100%;
}
.mb_tdrow1 {
    background-color: #F5F5F8;
    padding: 6px;
}
.mb_tdrow2 {
    background-color: #F8F8FB;
    padding: 4px;
}
.fieldbutton {
    background: url("../img/post/timnangcao.jpg") no-repeat scroll 0 0 transparent;
    border: 0 none;
    color: #485460;
    cursor: pointer;
    font: bold 11px Tahoma,Arial,Verdana;
    height: 32px;
    padding-bottom: 2px;
    width: 113px;
}
.fieldbutton {
    background: url("../img/post/timnangcao.jpg") no-repeat scroll 0 0 transparent;
    border: 0 none;
    color: #485460;
    cursor: pointer;
    font: bold 11px Tahoma,Arial,Verdana;
    height: 32px;
    padding-bottom: 2px;
    width: 113px;
}
label.error {
    display: inline;
    font-size: 110%;
    margin-left: 3px;
	color: red;
}
-->
</style>
<h1 class="mb_title">ĐĂNG KÝ THÀNH VIÊN</h1>
<div style="display: block; background-color: #6BA4E6; height: 3px; overflow: hidden;"></div>
<br />
<?php echo $form->create('User', array('controller' => 'users', 'action' => 'register' ,'style' => 'background-color: #F2F7FD;border: 1px solid #D6E8FD;'));?>
<?php echo $this->Form->input('group_id', array('value' => 3, 'type' => 'hidden'));?>
<table width="100%" cellspacing="1" cellpadding="0" border="0" >

<tr>
	<td class="mb_bgtitle" colspan="2">Thông tin đăng nhập</td>
</tr> 
<tr> 
	<td width="40%" valign="top" class="mb_tdrow1"><span class="textred">*</span>&nbsp;Tên đăng nhập:</td> 
	<td width="60%" class="mb_tdrow2"> <?php echo $form->input('username',array('label' => false, 'div' => false, 'class'=>'required'));?> </td>
</tr> 
<tr> 
	<td class="mb_tdrow1"><span class="textred">*</span>&nbsp;Mật khẩu:</td> 
	<td class="mb_tdrow2"> <?php echo $form->input('password',array('id' => 'pass', 'label' => false, 'div' => false, 'class'=>'required', 'value' => ''));?></td>
</tr> 
<tr> 
	<td class="mb_tdrow1"><span class="textred">*</span>&nbsp;Nhập lại mật khẩu:</td> 
	<td class="mb_tdrow2"> <?php echo $form->input('password_confirm',array('id' => 'pass_confirm', 'type' => 'password', 'label' => false, 'div' => false, 'class'=>'required'));?></td>
</tr> 
<tr> 
	<td class="mb_tdrow1"><span class="textred">*</span>&nbsp;Email:</td> 
	<td class="mb_tdrow2"> <?php echo $form->input('email',array('label' => false, 'div' => false, 'class'=>'required'));?></td>
</tr> 
</table>

<table width="100%" cellspacing="1" cellpadding="0" border="0" >
<tr> 
	<td class="mb_bgtitle" colspan="2">Thông tin cá nhân của bạn</td>
 </tr> 
<tr>
<td width="40%" valign="top" class="mb_tdrow1"><span class="textred">*</span>&nbsp;Họ tên:</td> 
	<td width="60%" class="mb_tdrow2"><?php echo $form->input('fullname',array('label' => false, 'div' => false, 'class'=>'required'));?></td>
 </tr> 
<tr> 
<td class="mb_tdrow1"><span class="textred">*</span>&nbsp;Địa chỉ liên hệ:</td> 
<td class="mb_tdrow2"><?php echo $form->input('address',array('label' => false, 'div' => false, 'class'=>'required'));?></td>
 </tr> 
<tr>
<td class="mb_tdrow1"><span class="textred">*</span>&nbsp;Tỉnh / Thành:</td> 
<td class="mb_tdrow2"><?php echo $form->input('city_id',array('label' => false, 'div' => false));?></td>

 </tr> 
<tr>
<td class="mb_tdrow1">Di động:</td> 
<td class="mb_tdrow2"> <?php echo $form->input('phone',array('label' => false, 'div' => false));?></td>

 </tr> 
<tr>
<td class="mb_tdrow1">Yahoo ID:</td> 
<td class="mb_tdrow2"> <?php echo $form->input('yahoo',array('label' => false, 'div' => false));?></td>
 </tr>  
 <tr>
	<td class="rv_tdrow2" align="center" colspan="2" style="text-align: center">
		<input class="fieldbutton" type="submit" value="Đồng ý" name="submit" onclick ="return check_pass_confirm()">
	</td>
 </tr>
 </table>
<?php echo $form->End();?>

